{extend name="base" /}
{block name="body"}
<div class="admin-main">

		
				
		
			
				
				<div class="layui-field-box">
				<div class="layui-box-searchber">
				<a href="{:url('admin/user/add')}" class="layui-btn layui-btn-small" id="add" style="float:left">
					<i class="layui-icon">&#xe608;</i> 添加用户
				</a>

				

                <form class="layui-form layui-form-pane" action="{:url('admin/user/index')}" method="get"  >
                    <div class="layui-inline">
                        <label class="layui-form-label">关键词</label>
                        <div class="layui-input-inline">
                            <input type="text" name="keyword" value="{:session('userkeyword')}" placeholder="请输入关键词" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn  layui-btn-small">搜索</button>
                    </div>
                </form>
                </div>
                <hr>

               	<table class="layui-table admin-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>用户名</th>
                        <th>手机</th>
                        <th>邮箱</th>
                        <th>状态</th>
                        <th>创建时间</th>
                        <th>最后登录时间</th>
                        <th>最后登录IP</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="user_list" item="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.username}</td>
                        <td>{$vo.mobile}</td>
                        <td>{$vo.usermail}</td>
                        <td>{php}echo $vo['status']==1 ? '启用' : '禁用';{/php}</td>
                        <td>{$vo.regtime|date="Y-m-d H:i:s",###}</td>
                        <td>{$vo.last_login_time|date="Y-m-d H:i:s",###}</td>
                        <td>{$vo.last_login_ip}</td>
                        <td>
                            <a href="{:url('admin/user/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-mini">编辑</a>
                            <a href="javascript:;" data-id="{$vo.id}" data-url="{:url('admin/user/delete',['id'=>$vo['id']])}" data-opt="del"  class="elementdel layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <!--分页-->
                
            </div>
        </div>
{/block}
  {block name="page"}
<div class="btable-paged" >
<div class="layui-main">
{$user_list->render()}
</div>
</div>
   {/block}
    {block name="js"}
<script type="text/javascript" src="__ADMIN__/js/delelement.js"></script>
 {/block}